/**
 * Copyright (C) 2010 Cloudfarming <info@cloudfarming.nl>
 *
 * Licensed under the Eclipse Public License - v 1.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.eclipse.org/legal/epl-v10.html
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package nl.cloudfarming.client.planning.tactical.wizard.common;

import java.util.Date;
import javax.swing.JLabel;
import javax.swing.JPanel;
import net.miginfocom.swing.MigLayout;
import nl.cloudfarming.client.planning.tactical.TacticalPlanningModule;
import org.jdesktop.swingx.JXDatePicker;
import org.openide.util.NbBundle;

public final class PlandatePanel extends JPanel {
    private JLabel planDateLabel;
    private JXDatePicker planDate;
    private final String TITLE = NbBundle.getMessage(TacticalPlanningModule.class, "field_plan.dialog.panel.title");
    private final String STARTDATE_LABEL = NbBundle.getMessage(TacticalPlanningModule.class, "field_plan.dialog.panel.label.startdate");
    
    /** Creates new form PlanningVisualPanel1 */
    public PlandatePanel() {
        initComponents();       
    }

    @Override
    public String getName() {
        return TITLE;
    }
    
    public Date getPlanDate(){
        return planDate.getDate();
    }
    
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    
    private void initComponents() {
        setLayout(new MigLayout("wrap 2"));
        planDateLabel = new JLabel(STARTDATE_LABEL);
        
        this.add(planDateLabel);
        planDate = new JXDatePicker();
        this.add(planDate);
        
    }
}
